<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function open_alert(){
            alert("asdasd")
        }
    </script>
</head>
<body>
    <button id="btn" onclick="open_alert()">click to open a alert</button>
</body>
</html>